messageReceived{
  if (!readingChunks) {
    HttpResponse response=(HttpResponse)e.getMessage();
    log.debug("STATUS: " + response.getStatus());
    log.debug("VERSION: " + response.getProtocolVersion());
    if (!response.getHeaderNames().isEmpty()) {
      for (      String name : response.getHeaderNames()) {
        for (        String value : response.getHeaders(name)) {
          log.debug("HEADER: " + name + " = "+ value);
    if (response.isChunked()) {
      readingChunks=true;
 else {
      ChannelBuffer content=response.getContent();
      if (content.readable()) {
        log.debug("CONTENT {");
        log.debug(content.toString(CharsetUtil.UTF_8));
    HttpChunk chunk=(HttpChunk)e.getMessage();
    if (chunk.isLast()) {
      readingChunks=false;
      log.debug(chunk.getContent().toString(CharsetUtil.UTF_8));
}
